Support a2a3 SDMA async completion#696
Merged
jvjhfhg merged 2 commits intohw-native-sys:mainfrom May 8, 2026
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request implements support for deferred SDMA asynchronous completion. It introduces a new demo and smoke test, integrates SDMA workspace management into the host communication layer, and extends the device-side async API to support SDMA event records. The scheduler and polling logic were updated to handle these new completion types and ensure thread-safe task transitions. Feedback was provided to include additional layout assertions for the PTO2SdmaEventRecord struct to ensure the safety of atomic operations.
3d99e93 to
c99ed28
Compare
c99ed28 to
3c6a461
Compare
jvjhfhg
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Details
pto2_defer_pto_async_event()now converts an SDMAAsyncEventinto runtime-polled event-record completion entriesSdmaEventRecord::flagand retires the record by clearing it and committing the completed SQ tailSIMPLER_ENABLE_PTO_SDMA_WORKSPACEPENDING -> READYbefore queueingValidation
build_chip_callable("a2a3", None, "https")python examples/a2a3/tensormap_and_ringbuffer/sdma_async_completion_demo/test_sdma_async_completion_demo.py -p a2a3 -d 1-2 --buildmax_out=0.000e+00 max_result=0.000e+00max_out=0.000e+00 max_result=0.000e+00python examples/a2a3/tensormap_and_ringbuffer/deferred_notify_demo/test_deferred_notify_demo.py -p a2a3sim -d 0-1 --buildmax_diff=0.000e+00